#ifndef MENUSTATE_H
#define MENUSTATE_H

#include "..\Audio\Music.h"
#include "..\Audio\Sound.h"
#include "..\Graphics\Sprite.h"
#include "..\Graphics\Text.h"
#include "..\Engines\TileEngine.h"
#include "..\Managers\AnimationManager.h"
#include "State.h"
#include "..\Graphics\Camera.h"


class BlinkingText;
class MenuManager;
class EventManager;
class CloudSpawner;
class MenuState : public State
{
public:
	enum MenuPosition
	{
		MENU_NONE = 0,
		MENU_MAIN,
		MENU_CREDITS,
		MENU_QUIT
	};

	MenuState();
	virtual ~MenuState();

	void initialize();
	void shutdown();
	void update(const GameTime& p_gameTime);
	void handleEvents();

protected:
	inline void logoFade(const GameTime& p_gameTime);
	void showCredits();
	void loadGame();
	void startGame();

	EventManager* m_eventManager;

	MenuManager* m_menuManager;
	MenuManager* m_quit;
	MenuManager* m_credits;

	vn::Sprite* m_sprite;
	vn::Sprite* m_logo;
	vn::Sprite* m_moon;
	vn::TileEngine* m_tileEngine;
	vn::Camera* m_camera;
	vn::Text* m_text;
	BlinkingText* m_pressStart;
	vn::AnimationManager* m_animation;
	CloudSpawner* m_cloudSpawner;
	bool m_fadeLogo;
	bool m_skipIntro;
	bool m_startGame;
	bool m_loadGame;
	float m_logo_height;
	int m_menuPosition;
	vn::Music* m_loop;
};

#endif //MENUSTATE_H